export const getDataByPath = function(data, path) {
  if (!data || !path) {
    return ''
  }
  const arr = path.split('.')
  if (!arr.length) {
    return data
  }
  let result = data
  arr.forEach(e => [(result = result[e])])
  return result
}
